<?php
$tab = $db->select("
id, 
firstname, 
lastname, 
mail, 
phone, 
DATE_FORMAT(birthdate, '%e') AS jj, 
DATE_FORMAT(birthdate, '%m') AS mm, 
DATE_FORMAT(birthdate, '%Y') AS yyyy, 
(YEAR(CURRENT_DATE) - YEAR(birthdate)) - (RIGHT(CURRENT_DATE,5) <= RIGHT(birthdate,5)) +1 AS age, 
TO_DAYS(CONCAT(LEFT(CURRENT_DATE,5), RIGHT(birthdate, 5))) - TO_DAYS(CURRENT_DATE) AS dans",
$CONFIG['table_birthdays'],
"userlogin='".$_SESSION['login']."' AND birthdate IS NOT NULL",
"dans"
);

echo '<ul>';
$i = lister($tab);
echo '</ul>';

?>
